/*
 * @Author: daniel_du dll_2018@126.com
 * @Date: 2022-05-01 06:35:50
 * @LastEditors: daniel_du dll_2018@126.com
 * @LastEditTime: 2022-05-09 08:44:23
 * @FilePath: /safe_transmission_platform/src/client/main.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
//密钥协商客户端程序
//密钥协商、密钥校验和密钥销毁

#include "log.h"
#include <iostream>
#include <string>
#include "ClientOption.h"

sylar::Logger::ptr g_logger=DANIEL_LOG_NAME("system");

int8_t menu()
{
    std::cout<<std::string(28,'*')<<"请输入你的选择"<<std::string(28,'*')<<std::endl;
    std::cout<<std::string(30,'*')<<"1.密钥协商"<<std::string(30,'*')<<std::endl;
    std::cout<<std::string(30,'*')<<"2.密钥校验"<<std::string(30,'*')<<std::endl;
    std::cout<<std::string(30,'*')<<"3.密钥注销"<<std::string(30,'*')<<std::endl;
    std::cout<<std::string(30,'*')<<"4.发送消息"<<std::string(30,'*')<<std::endl;
    std::cout<<std::string(30,'*')<<" 5.退出  "<<std::string(30,'*')<<std::endl;
    int32_t num;
    std::cin>>num;
    while (getchar()!='\n');
    return num;
}

int main()
{
    ClientOption::ptr clientOp(new ClientOption());
    while (1)
    {
        int8_t select=menu();
        switch (select)
        {
        case 1:
            clientOp->seckeyNego();
            break;
        case 2:
            clientOp->seckeyCheck();
            break;
        case 3:
            clientOp->seckeyCancel();
            break;
        case 4:
            break;
        case 5:
            return 0;
            break;
        default:

            break;
        }
    }
    return 0;
}